0.12.3
----------
- Fixed issue with mastery effects getting un-applied after replaying a battle.
- Fixed solo replay not creating a battle instance, which could cause crashes with modded battle creation contexts.
- Temporary encounter dialog created for recent battles now copies the existing "core UI", increasing robustness and compatibility with mods that don't use null checks.
- Fixed latent crash issue with flagship tracker that was only being triggered by FSF (no version update, re-download latest version if you're still encountering this).
- Added missing comma in settings json (no version update, re-download latest version if you're still encountering this).

0.12.2
----------
- Fixed potential loading crash issue where persistent data hadn't been loaded yet.

0.12.1
----------
- Masteries that require a ship to earn the "kill credit" for a target are now more lenient
    - As long as a ship damaged a target within 1 second of its destruction, it counts as a kill for the ship.
    - Doesn't apply to the terminator drone mastery, as that requires the drone to deal the killing blow.
- Added NPC indicator hullmods up to mastery level 15.
    - NPC fleets with mastery levels greater than or equal to 15 will show "Level 15+", as was the case before with levels greater than or equal to 9.
- No longer generates masteries for *all* hull specs on game load, now uses a lazy approach where masteries are only generated as necessary.
    - Should substantially improve performance for games with a lot of hull specs and/or games where the maximum level has been configured higher than default.
- No longer generates non-random masteries first in order to preserve input order in configurations with multiple masteries in a level
    - Unwanted duplicates should be handled in RandomMastery by checking generators.
- Mastery effect that grants damage reduction for nearby owned fighters no longer affects modules.
- Mastery effects that boost performance based on flux level are no longer in effect if the ship is overloaded or venting.
- Improved performance by caching Utils.getRestoredHullSpec results.
- Adjusted reroll confirmation dialog to better accommodate for custom configs with lots of mastery levels.
- Fixed possible memory leak related to recent-battles tracker.
- Fixed rare crash with missile boost masteries where weapon.getSprite() could be null.
- Fixed issue with non-combat and auto-pursuit XP not taking number of ships of the same type into account.

0.12.0
----------
If added to an existing save, prepare for your mastery effects to be completely rearranged and changed:
    Mastery level structure has been changed.
    Mastery weights have been modified and new mastery effects have been added.
    Reroll mechanic has been modified slightly.

- Added the "Engineering Override" hullmod, which increases S-mod capacity by 2 but prevents the ship from benefiting from mastery effects.
    - Also reduces MP cost of building in and enhancing to 0 and reduces credits cost by 75%.
    - Reduces max CR by 5% per S-mod and becomes permanent if you build something in with it enabled.
- Added new mastery effects:
    - Increased energy damage by up to 10% depending on flux level.
    - Increased missile rate of fire and ammo regen by up to 10% depending on flux level.
    - Increased speed, flux dissipation, and weapon rate of fire by 5% when at full hitpoints.
    - Improved ship system recharge and regeneration rate by 10% (stat effect).
- Moved S-mod capacity masteries from levels 2 and 5 to levels 3 and 6, as Engineering Override provides an alternative to getting S-mods immediately and cheaply.
- Level 1 mastery now gives a choice between two options.
- Now shows some warning text if you leave one or more available levels for a hull type unassigned.
- Merged multiplicative stat boosts and flat stat boosts into a single mastery effect class when randomly generating.
    - Previously they were separate, and since there were far fewer flat boosts (e.g. max burn, max CR), they would end up getting selected disproportionately.
- When regenerating "varying" (those with additional parameters) effects into the same effect, will now avoid picking the same additional parameters.
    - E.g. it's significantly less likely to reroll into the same stat boost as before.
- When generating mastery effects, all non-random effects are now generated first, followed by all random effects.
- Randomly generated effects now also avoid repeating the same effect, even if it's not marked as "unique".
    - Removed unique tag from some mastery effects that should theoretically be stackable.
- Downgraded some masteries from tier 3 (levels 6-7) to tier 2 (levels 3-4).
- Mastery effect that increases PPT per additional ship of the same type now no longer generates for capitals ships or those with >=40 DP.
- D-mod acquisition probability and effect reduction masteries are no longer limited to combat ships (but are still less common on civilian ships).
- Nerfed hard-flux dissipation for plasma jets mastery by 50%.
- Nerfed ballistic-fire-rate-based-on-hull-level mastery from 15% to 12.5%.
- Shield hullmod mastery effect now reduces shield upkeep by 50% rather than negating it entirely. Also nerfed damage reduction by 25%.
- Increased decay rate of increased range if not moving/no nearby enemies masteries by 25%.
- Miscellaneous stat mastery changes.
- Split MP_GAIN_MULTIPLIER setting into combat and civilian sub-settings.
- Bonus logistics S-mod check now properly uses HullMods.TAG_UI_LOGISTICS.
- Build-in list now shows ship-specific hullmod tooltips.
- Fixed potential issue with station modules not receiving the +3 enhance bonus.
- Fixed issue where logistics hullmods that couldn't be built in would still be highlighted green when earning the additional logistics S-mod from enhancing.
- Fixed issue with autofit S-mod plugin not saving the variant when it needed to and, conversely, saving the variant unnecessarily.
    - Now, variant will be saved (preventing undo) if and only if S-mods were added, both with this mod's main features enabled and disabled.
- Fixed issue where code in static blocks could be called too early, when e.g. Global.getSettings().getAllShipHullSpecs() could return an empty list.

0.11.5
----------
Reroll mechanic has been modified -- you may find your mastery effects changed if you rerolled them.

- Cybernetic augmentation:
    - Max bonus reduced from 12% to 10%.
    - Ship types required to master for max bonus reduced from 30 to 20.
    - Civilian ships no longer count.
    - Added some settings to tune this to your liking.
- Reduced "Extradimensional Rearrangement" variance:
    - Extra time flow is now always 10% (multiplicative).
    - Stat penalties are always between -10% and -5%, with lower penalties being more common.
    - Exact stat penalties are now shown in the hullmod tooltip.
- MP assignment algorithm for combat encounters now takes deployed time (with enough enemies in range to degrade CR) into account.
    - Chance to gain mastery scales linearly with total time deployed, up to 60 seconds.
    - Meant to discourage deploying and instantly retreating a ship without it ever having seen combat.
- Decreased civilian MP gain by a flat 20%, increased combat MP gain by a flat 20%.
- Reduced auto-pursuit MP penalty from 65% to 50%.
- Regenerate option now strongly prefers mastery effects different from the effects prior to regenerating.
- Added id to S-Mod autofit plugin
- Mastery effect that reduces weapon flux for each empty mount no longer counts decorative and non-weapon slots.
- Modified the extra-frag-damage-for-large-ballistic-weapons mastery to scale based on the projectile's original damage, so it doesn't disproportionately favor e.g. storm needlers.
- Nerfed missile-regen-on-kill mastery.
- Nerfed random beam damage mastery, extra damage is now flat 50% regardless of mastery strength increases.
- Buffed residual armor mastery.
- Buffed energy mine mastery effect base damage by 20% and fixed issue that caused piercing arcs not to scale with mastery bonuses.
- Fixed issue where excess OP being removed in the refit screen didn't also apply to the fleet-facing ship, causing the same message to pop up again when re-selecting the offending ship.
- Fixed issue where regenerating masteries could be confirmed with spacebar input even if there was nothing to regenerate.

0.11.4
----------
- Removed FileNotFoundException from some debug code.
- Fixed issue with unused MP cost mastery.

0.11.3
----------
Mastery weights have been changed, generated masteries will be different.

- Adjusted the weights of many randomly selected mastery effects; in general, effects that were too common have been made less common.
- Crew loss mastery no longer generates for ships specs without crew.
- Fixed "excess fuel" warning showing up on game load with masteries that increase fuel capacity.
- Fixed S-mod capacity levels being unseeded when random mode is enabled.
- Handled possible (but which should never happen) cyclic base ship chain.

0.11.2
----------
- Fixed another issue with flagship tracker not working in some cases.

0.11.1
----------
- Fixed an infinite MP exploit -- knowledge constructs no longer grant MP to skins.

0.11.0
----------
- Added the ability to create knowledge constructs by spending 10 MP. These can then be sold for credits.
- Added progression options to evolve NPC fleet difficulty over time.
    - Progression is based on total player MP gain for all combat ships, excluding those gained passively for skins.
    - Updating an existing save game will start its progression counter at 0.
- (New game only) Moderately decreased the number of concealed stations generated per sector, and added a lower limit of 4.
- Improved MP gain from large battles (single actions that grant lots of XP)
- Changed knowledge construct price upper bound from 100000 to 60000, lower bound from 0 to 20000.
- Reduced passive MP gain for skins from 75% to 50%.
- Reduced the default strength of a bunch of mastery effects that slipped past the first pass.
- Mastery effect that prevents CR from dropping below a certain threshold now no longer prevents malfunctions if Safety Overrides is installed.
- Fixed range display issue in the description text of phase skimmer EMP arc mastery.
- Extra logistics S-mod is now reflected in MAX_PERMANENT_HULLMODS mod (no behavioral change, but should work better with other mods that check S-mod count)
- Fixed exploit between S-mod-enabled autofit and extreme modifications
- Fixed issue with clearing S-mods with refunds enabled granting extraneous MP to skins
- Fixed issue where flagship tracking was using the combined fleet's commander rather than the individual fleet's commander when applying mastery effects.
- Mastery interface is now slightly bigger.
- Changed the "Clear S-mods" sound to be the same as adding S-mods.

0.10.2
----------
Mastery weights have been changed -- should be save-compatible, but your mastery effects will likely be different after the update.
Additionally, the reroll system has seen significant under-the-hood changes. Reroll counts have been reset.

- Whenever you gain mastery points for a ship type, you will now gain 75% of those points for all similar hulls. Two ship hulls are similar if one is a skin of the other, or if they are two different skins of the same base hull (e.g. Pegasus and Executor).
    - Cybernetic augmentation has been modified to reflect this -- now two "ship types" are only distinct for the purposes of the OP bonus if they don't share the same base hull.
- The "regenerate" option now only rerolls effects for levels where you don't have a mastery already selected. This should alleviate the rare occurrence that you reroll into something that can't be changed/removed, and also allows selective rerolling of specific levels.
- The seed for random mastery generation can now be directly set in the settings. This is saved on game generation, and changing it requires a new game. Leave empty or whitespace only to use the sector seed, as before.
- Adjusted some masteries.
- S-Mod autofit option now properly detects and can apply the free logistics S-Mod slot from enhancing.
- Fleet post-inflater no longer modifies ships generated for the player via custom production.
- Fixed padding issue causing enhancement text to overlap repair bar in refit menu.
- Fixed fighter/bomber OP cost masteries being generated for ships without modular bays.
- Fixed fighter LPCs getting deleted when deactivating masteries that increase number of fighter bays; now they are added back to the inventory.
- Removed extraneous debug console output.
- Removed "phasefield" check for phase preset, instead checks spec.isPhase()

0.10.1
----------
- Enhancements now give +10% boost for +1, +2, +4, and +5, totaling 40% as before. The +3 boost now grants a conditional S-mod slot that is usable for logistic hullmods only.
- Greatly reduced variance in MP gain when gaining large amounts of XP in a single action. This also slightly reduces MP gain from smaller battles and slightly increases MP gain from larger battles; the break even point is about 85000XP (without bonus XP).
- Reduced prioritization of ship types with fewer MP when assigning MP gain.
- Enhancing civilian ships no longer costs SP.

0.10.0
-----------

Weakly save compatible with previous version, but mastery level progression and mastery effect generation have been changed,
 so if you update, your mastery tables will be rearranged and effects may not be the same as before.

The standard mastery progression has been reworked a bit. In summary: reduced possible S-mods at max mastery from 4 to 3,
removed the DP penalty from the 3rd (previously 4th) S-mod slot. Details:
- S-mod capacity masteries removed from levels 4 and 6 and replaced with randomized masteries.
- S-mod capacity mastery added to level 5.
- DP-penalizing S-mod capacity mastery removed from level 8, replaced with standard S-mod capacity mastery.
- Level 1 mastery effect strength multiplier 0.6 -> 1, level 2-6 masteries effect strength multiplier 0.8 -> 1.

Added the ability to reroll mastery effects upon reaching max mastery level.
- Costs 20 MP and 1 SP.
- Affects all randomized effects (by default, this is now the effects at levels 1, 3, 4, 6, and 7).
- Seeded for each ship hull, so it can't be save-scummed, e.g. rerolling a ship hull's masteries for the kth time will
  always yield the same result.

Added the ability to enhance mastery bonuses upon reaching max mastery level.
- Costs 20 MP (+5 MP for each previous enhance) and 1 SP.
- Increases mastery strength by 8%, can be done a maximum of 5 times.

Other changes:
- Mastery strength bonuses have been changed: Best of the Best 20% -> 30%, mastery scaling buff 40% -> 30%.
- Maximum mastery strength bonus 60% -> 100% with addition of enhancing. Numerous effects have had their base strength
  reduced slightly to compensate.
- Default presets are now assigned according to the ship spec's hints, tags, and/or built-in mods.
  This should help compatibility with modded civilian ships, remnant ships, etc.
   - logistic_cargo checks for FREIGHTER hint, logistic_crew checks for LINER hint, logistic_fuel checks for TANKER hint.
   - automated ships check for automated built-in hullmod, derelict drones check for derelict tag.
   - phase ships check for phasefield built-in hullmod.
   - if a single ship hull satisfies multiple conditions, the priority order is hints -> tags -> built-in mods.
- Automated and phase ships now get an extra S-mod slot in level 8A in addition to their previous bonuses.
- Single actions that grant less than 600 XP no longer give MP to civilian ships.
- Increased combat ship MP gain by ~15%.
- Reduced auto-pursuit MP gain by ~30%, and fixed a bug that caused more auto-pursuit MP gain than intended.
- Reduced base credits cost for building in S-mods by 25%.
- Increased mastery leveling costs across the board by 1, except levels beyond 8 which now cost a flat 15 MP.
- Knowledge constructs now give 10 MP, up from 5.
- Knowledge constructs now have two drop tables, one table is random as before and the other strongly prefers ships
  already in the player's fleet. Most drop sources use the non-random table.
- Knowledge constructs no longer generate for ships with the STATION hint.
- Fixed an issue with mastery generation that could cause different masteries to be generated with the same seed
  if a previous set of effects had already been stored into memory.
- Resolved possible NPE during custom collision check.
- Fixed an issue where non-modules could sometimes be treated as modules, causing some mastery effects to not work properly.

0.9.3
-----------
- Fixed Cybernetic Augmentation not working with 0 mastered ship types

0.9.2
-----------
- Fixed crash with FleetMember.getHullSpec when using Linux/Mac
- (D)(D) hulls now correctly share their mastery pool with non D-hulls.
- When generating mastery effects for a ship type, built-in weapon slots are no longer considered

0.9.1
-----------
- Added setting to always enable clearing of S-Mods regardless of if it's been unlocked by a mastery effect.
- Added setting to enable clearing S-Mods to refund a fraction of credits and MP spent; default is still no refund.
- Added setting that multiplies all MP gain from actions that also grant XP.
- Added setting that multiplies the credits cost of building in hullmods.
- If dev mode is enabled, upgrading mastery level and building in hullmods no longer checks if you have the required resources.
- Fixed S-Mod autofit option not showing up for modules

0.9.0
-----------
- Added "Replay Battle" feature
- Added option to disable mod's main features
- Removed VariantLookup stuff from save file
- Improved consistency of post-inflation sequence, everything is now seeded based on the commander's id
- Refactored LunaLib settings, this will reset them if you modified them
- Reduced the effectiveness of the "less DP if only ship of that type in fleet" mastery effect for frigates, destroyers, and cruisers
- Greatly increased the chance that a mastered ship with lots of MP will still gain MP when competing with other ship types for MP
- Mastery effect that grants range if no other bonuses are affecting range now works with ballistic mastery and gunnery implants
- Mastery effect that grants additional ammo if EMR and expanded magazines are both installed is now multiplicative
- Fixed minimum CR mastery effect causing auto-retreat when deployed
- Fixed converted hangar effects being randomly selected for phase ships
- Fixed adding S-mods to modules not subtracting MP
- Fixed issue where recovered ships would maintain enemy commander's mastery levels and selections until game load
- Minor optimizations

0.8.2
-----------
- Building in hullmods now costs more MP for ships with greater base DP; the cost is 1 plus an additional 1 for every 25 DP
  Enhancing pre-built-in hullmods still always costs 1 MP
- Renamed LunaSettings field IDs to include a mod prefix. This will reset settings to default if you've changed them
- Fixed rare crash bug relating to a specific stat
- Fixed safety overrides mastery effects showing up for ships with built-in flux shunt
- Fixed some typos, added some clarifications

0.8.1
-----------
- Reduced modified Cybernetic Augmentation base OP bonus from 5% to 2%, max from 15% to 12%
- Cleaned up unused stuff
- Fixed bad direct download and changelog links
- Fixed typo in README
- Fixed a hash function always being a multiple of 31

0.8.0
-----------
Initial release